<!--
    Think.get.type == 1 ,为选择状态
-->
<div class="bjui-pageHeader">
    <empty name="Think.get.type">
        <div class="pull-right">
            <button class="btn-default" data-icon="plus" title="新增关键词" data-toggle="tooltip" data-placement="left" onclick="createDialog('{:U("Wx/newkey")}', '新增关键词', 'newkey', {width:800, height:500})" ></button>
            <a href="{:U('Wx/del_wx_autoreply')}" class="btn btn-default" data-toggle="doajaxchecked" data-icon="remove" data-callback="callbackRefres" data-confirm-msg="要删除全部选中的吗??" data-idname="id" data-group="ids"></a>
            <button class="btn-default" data-icon="refresh" onclick="$.CurrentNavtab.navtab('refresh')"></button>
        </div>
    </empty>

    <form id="pagerForm" data-toggle="ajaxsearch" data-loadingmask="true" action="{:U('autoreply')}" method="post">
        <input type="hidden" name="pageSize" value="{:I('param.pageSize')}" />
        <input type="hidden" name="pageCurrent" value="{:I('param.pageCurrent')}" />
        <input type="hidden" name="orderField" value="{:I('param.orderField')}" />
        <input type="hidden" name="orderDirection" value="{:I('param.orderDirection')}" />
        <div class="bjui-searchBar">
            <label>类型:</label>
            <select name="status" data-toggle="selectpicker">
                <option value="0">全部</option>
                <option value="1" <if condition="I('status') eq '1'">selected</if>>文本</option>
                <option value="2" <if condition="I('status') eq '2'">selected</if>>图文</option>
                <option value="3" <if condition="I('status') eq '3'">selected</if>>语音</option>
                <option value="4" <if condition="I('status') eq '4'">selected</if>>视频</option>
                <option value="5" <if condition="I('status') eq '5'">selected</if>>图片</option>
            </select>
            <label>关键词名称:</label>
            <input type="text" name="name" value="{:I('name')}" />
            <button type="submit" class="btn-default" data-icon="search">查询</button>
            <a class="btn btn-orange" href="javascript:;" data-toggle="reloadsearch" data-clear-query="true" data-icon="undo">清空查询 </a>
        </div>
    </form>
</div>
<div class="bjui-pageContent tableContent">
    <table class="table table-bordered table-hover table-striped table-top" data-selected-multi="false">
        <thead>
        <tr>
            <th width="26"><input type="checkbox" class="checkboxCtrl" data-group="ids" data-toggle="icheck"></th>
            <th>关键词</th>
            <th>类型</th>
            <th width="100">操作</th>
        </tr>
        </thead>
        <tbody>
        <volist name="list" id="vo">
        <tr>
            <td width="26"><input type="checkbox" value="{$vo.id}" class="checkboxCtrl" name="ids" data-toggle="icheck"></td>
            <td>{$vo.name}</td>
            <td>
            <switch name="vo['status']">
            <case value="1">文本</case>
            <case value="2">图文</case>
            <case value="3">语音</case>
            <case value="4">视频</case>
            <case value="5">图片</case>
            </switch>
            </td>
            <td>
                <empty name="Think.get.type">
                    <button type="button" class="btn-green" onclick="createDialog('{:U("Wx/newkey",array("id"=>$vo["id"]))}', '编辑关键词', 'newkey', {width:800, height:400})">改</button>
                    <a href="{:U('Wx/del_wx_autoreply',array('id'=>$vo['id']))}" data-type="get" class="btn btn-red" data-toggle="doajax" data-confirm-msg="你确定要删除这个关键字吗?" >删</a>
                <else />
                    <button type="button" class="btn-green" data-toggle="lookupback" data-args="{keyword_id:<php>echo $vo['id']</php>, keyword_name:'<php>echo $vo['name']</php>'}">选</button>
                </empty>

            </td>
        </tr>
        </volist>
        </tbody>
    </table>
</div>
<include file="Common/footer" ftype="page" />